package controller

import (
	"core/service"

	"github.com/gin-gonic/gin"
)

func triggerProject(c *gin.Context) {
	projectId := c.Param("projectId")
	err := service.TriggerProject(projectId)
	if err != nil {
		SendError(c, err)
	}
	SendData(c, nil)
}

func ProjectRegister(r *gin.Engine) {
	r.POST("/projects/trigger/:projectId", triggerProject)
}
